package cn.niit.letuseatdemo.service;

import java.util.List;

import cn.niit.letuseatdemo.entity.domain.UserAddress;

/**
 * 用户地址Service接口
 * 
 * @author aoli_jojo
 * @date 2022-10-26
 */
public interface UserAddressService
{
    /**
     * 查询用户地址
     * @Author: Zhang Shiqi
     * @param addressId 用户地址主键
     * @return 用户地址
     */
    public UserAddress selectUserAddressByDId(Long addressId,Long userId);

    /**
     * 查询用户地址列表
     * @Author: Zhang Shiqi
     * @param userAddress 用户地址
     * @return 用户地址集合
     */
    public List<UserAddress> selectUserAddressList(UserAddress userAddress,Long userId);

    /*
    * @Description: 查询默认地址
    * @Author: Zhang Shiqi
    * @CreateTime： 2023/4/24 1:58
     * @param: userId
     * @return: cn.niit.letuseatdemo.entity.domain.UserAddress
    **/
    public UserAddress selectUserDefualtAddress(Long userId);

    /**
     * 新增用户地址
     * @Author: Zhang Shiqi
     * @param userAddress 用户地址
     * @return 结果
     */
    public int insertUserAddress(UserAddress userAddress);

    /**
     * 修改用户地址
     * @Author: Zhang Shiqi
     * @param userAddress 用户地址
     * @return 结果
     */
    public int updateUserAddress(UserAddress userAddress);


    /*
    * @Description: 删除地址
    * @Author: Zhang Shiqi
    * @CreateTime： 2022/12/8 20:14
     * @param: addressId
     * @return: int
    **/
    public int deleteUserAddressByAddressId(Long addressId);


    /*
    * @Description:根据地址id查地址
    * @Author: Zhang Shiqi
    * @CreateTime： 2023/4/25 4:15
     * @param: addressId
     * @return: cn.niit.letuseatdemo.entity.domain.UserAddress
    **/
    UserAddress selectUserAddressByAddressId(Long addressId);
}
